"use strict";
function print(student) {
    console.log(student.name + "已经" + student.age + "岁了");
}
class stu {
    constructor(student, school) {
        if (typeof student == "string") {
            this.name = student;
            this.age = school || 0;
        }
        else {
            this.name = student === null || student === void 0 ? void 0 : student.name;
            this.age = student === null || student === void 0 ? void 0 : student.age;
            this.family = (student === null || student === void 0 ? void 0 : student.family) || [];
            this.school = school || "";
        }
    }
}
var ss = {
    name: "小明",
    age: 18,
    family: ["弟弟", "妹妹"]
};
var stud = new stu(ss, "北京");
console.log(stud);
